import request from '@/utils/request'

export default {

    //添加小节
    addKnobble(knobble) {
        return request({
            url: `/eduservice/video/addKnobble`,
            method: 'post',
            data:knobble
        })
    },

    //修改小节
    updateKnobble(knobble){
        return request({
            url: `/eduservice/video/updateKnobble`,
            method: 'post',
            data:knobble
        })
    },
    
    //根据id删除小节
    deleteKnobble(knobbleId){
        return request({
            url: `/eduservice/video/deleteKnobble/${knobbleId}`,
            method: 'delete'
        })
    },

    //根据id获取小节
    getKnobbleById(knobbleId){
        return request({
            url: `/eduservice/video/getKnobbleById/${knobbleId}`,
            method: 'get'
        })
    },

     //根据视频id删除视频
     deleteVideoById(videoId){
        return request({
            url: `/eduvod/video/deleteVideoById/${videoId}`,
            method: 'delete'
        })
    }
}